<template>
	<view class="container">
		<!-- 		<cu-custom bgColor="bg-blue" :isBack="true">
			<block slot="backText"></block>
			<block slot="content">通用详情页</block>
		</cu-custom> -->

		<view class="bg-top bg-blue">

			<view class="center-box shadow">
				<view class="cu-list menu">
					<view class="cu-bar bg-white margin-top-xs u-border-bottom">
						<view class="action sub-title">
							<text class="text-xl text-bold text-blue text-shadow">工单详情</text>
							<text class="text-ABC text-blue">Detail</text>
						</view>
					</view>


					<view class="cu-item" style="padding: 0;">
						<view class="content">
							<text class="cuIcon-myfill text-green"></text>

							<text class="text-lg">工单状态</text>
						</view>
						<view class="action">

							<button class="cu-btn round sm shadow bg-red margin-left" v-if="status == 1">待处理</button>
							<button class="cu-btn round sm shadow bg-blue margin-left" v-if="status == 2">已处理</button>

						</view>
					</view>


					<view class="cu-item" style="padding: 0;">
						<view class="content">
							<text class="cuIcon-myfill text-blue"></text>
							<text class="text-lg">账号</text>
						</view>
						<view class="action">
							<text class="text-grey text-sm">13888888888</text>
						</view>
					</view>
					<view class="cu-item" style="padding: 0;">
						<view class="content">
							<text class="cuIcon-myfill text-blue"></text>
							<text class="text-lg">集团名称</text>
						</view>
						<view class="action">
							<text class="text-grey text-sm">双向绑定有限公司</text>
						</view>
					</view>


					<view class="cu-item" style="padding: 0;">
						<view class='content'>
							<text class="cuIcon-mobilefill text-blue"></text>
							<text class='text-lg'>联系电话</text>
						</view>
						<view class="action">
							<view class="cu-tag round bg-blue light">
								18688888888
							</view>
						</view>
					</view>

					<view class="cu-item" style="padding: 0;">
						<view class='content'>
							<text class="cuIcon-mobilefill text-blue"></text>
							<text class='text-lg'>光猫SN</text>
						</view>
						<view class="action">
							<view class="cu-tag round bg-blue light">
								SN858585865
							</view>
						</view>
					</view>
					<view class="cu-item" style="padding: 0;">
						<view class='content'>
							<text class="cuIcon-mobilefill text-blue"></text>
							<text class='text-lg'>电视密码</text>
						</view>
						<view class="action">
							<view class="cu-tag round bg-blue light">
								PASSWORD123456
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="center-box shadow"></view>

			<!-- 加入按钮 -->
			<view v-if="status == 1">
			<view class="padding-lr flex margin-top-sm" style="justify-content: space-between;" >
				<button class="cu-btn bg-blue margin-top-sm bg-login-zl lg" @click="submit()" style="width: 100%;">确认处理</button>
			</view>

			<view style="height: 25px;"></view>
</view>
			<!-- 施工详情 -->
			<view v-if="status == 2">
				<view class="center-box shadow">
					<view class="cu-list menu">
						<view class="cu-bar bg-white margin-top-xs u-border-bottom">
							<view class="action sub-title">
								<text class="text-xl text-bold text-blue text-shadow">处理详情</text>
								<text class="text-ABC text-blue">Detail</text>
							</view>
						</view>

						<view class="cu-item" style="padding: 0;">
							<view class="content">
								<text class="cuIcon-myfill text-blue"></text>
								<text class="text-lg">处理人</text>
							</view>
							<view class="action">
								<text class="text-grey text-sm">李四</text>
							</view>
						</view>
						<view class="cu-item" style="padding: 0;">
							<view class="content">
								<text class="cuIcon-mobilefill text-blue"></text>
								<text class="text-black">联系电话</text>
							</view>
							<view class="action">
								<text class="text-grey text-sm">1888888888</text>
							</view>
						</view>


						<view class="cu-item" style="padding: 0;">
							<view class='content'>
								<text class="cuIcon-timefill text-blue  margin-right-xs"></text>
								<text class="text-black">完成时间</text>
							</view>
							<view class="action">
								<view class="cu-tag round bg-blue light">
									2024-05-17 18:00
								</view>
							</view>
						</view>

					</view>
				</view>
			</view>
			<!-- 加入按钮 -->

			<view class="padding-lr flex margin-top-sm" style="justify-content: space-between;" v-if="status == 2">
				<button class="cu-btn bg-blue margin-top-sm bg-login-zl lg" @click="reject()" style="width: 100%;">作废</button>
			</view>
			<view style="height: 25px;"></view>

			<view class="">
				<u-modal :show="show" title='是否作废?' content='确认要作废吗?' @cancel="cancel" @confirm="confirm" ref="uModal" :showCancelButton = "showCancelButton" :asyncClose="true"></u-modal>
			</view>
		<u-toast ref="uToast"></u-toast>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				joinList: [{

					},
					{

					}
				],
				form: {
					remark: '需求备注需求备注需求备注需求备注需求备注'
				},
				fileList4: [{
						url: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
					},
					{
						url: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
					},
					{
						url: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
					}
				],
				deletable: false,
				status: '',
				show: false,
				showCancelButton:true,
				uToastType: {
					type: 'success',
					title: '默认主题',
					message: "单据作废成功",
					// 	iconUrl: '/pages/kwork/list'
					url: '/pages/enterprise/list',
				}
			}
		},
		onShow() {

		},
		onLoad(e) {
			this.status = e.status
		},
		onReachBottom() {

		},
		onShareAppMessage() {
			return {
				title: '分享'
			}
		},
		methods: {
			submit() {
				uni.navigateTo({
					url: '/pages/enterprise/handle'
				})
			},
			reject() {

				this.show = true;

			},
			cancel(){
				this.$u.toast('您取消了~')
				this.show = false;
			},
			confirm(){
				let uToastType = this.uToastType
				this.show = false;
				this.$refs.uToast.show({
					...uToastType,
					complete() {
						uToastType.url && uni.navigateTo({
							url: uToastType.url
						})
					}
				})
			}
		}
	}
</script>
<style lang="scss" scoped>
	// .bg-login-zl {
	// 	background-image: linear-gradient(45deg, #727CFB, #46D0ED);
	// 	color: #ffffff;
	// }
	// .bg-blue {
	// 	background-image: linear-gradient(45deg, #727CFB, #46D0ED);

	//     color: #ffffff;
	// }
	.container {
		width: 750rpx;
		color: #333333;

		.bg-top {
			margin-top: -1rpx;
			width: 750rpx;
			height: 320rpx;
			padding-top: 100rpx;
			border-radius: 0 0 20% 20%;

			.top-box {
				width: 700rpx;
				background-color: #FFFFFF;
				margin: 0 auto;
				border-radius: 20rpx;
				padding: 20rpx 30rpx 0rpx;
				position: relative;

				.qh-pic {
					position: absolute;
					right: 64rpx;
					top: -50rpx;
					border-radius: 12rpx;
				}

				.qh-title {
					width: 100%;
					height: 60rpx;
					line-height: 65rpx;
					text-align: center;
					// 	padding-right: 190rpx;
				}

				.bxBox {
					position: relative;
					display: flex;
					/* padding: 0 30rpx; */
					min-height: 100rpx;
					/* background-color: #ffffff; */
					/* justify-content: space-between; */
					align-items: center;
					font-size: 30rpx;
					line-height: 1.6em;
					flex: 1;

					.bxImg {
						display: inline-block;
						margin-right: 10rpx;
						width: 1.6em;
						text-align: center;
					}
				}

			}
		}

		.center-box {
			color: #333333;
			width: 700rpx;
			background-color: #FFFFFF;
			margin: 0 auto;
			border-radius: 20rpx;
			padding: 0rpx 30rpx 0rpx;
			position: relative;
			margin-top: 20rpx;
		}
	}
</style>